<template>
  <div class="assess">
    <Header></Header>
    <div class="assessMain">
      <p class="current-nav2">
        当前位置 :
        <router-link to="index">首页</router-link>
        <i>></i>
        <a>{{planCompany}}应急预案评审</a>
        <i>></i>
        <a>评审意见汇总</a>
      </p>
      <div class="mianOut">
        <div class="mianInner1">
          <div class="assess-title1">
            <h3>评审意见汇总</h3>
          </div>
          <el-table ref="multipleTable" class="mt60" :data="data1">
            <el-table-column type="index" align="center" label="序号" width="150"></el-table-column>
            <el-table-column prop="createUser" label="评审专家" align="center" width="200"></el-table-column>
            <el-table-column prop="identity" label="身份" align="center">
              <template>组长</template>
            </el-table-column>
            <el-table-column label="形式评审" align="center">
              <template slot-scope="scope">
                <span v-if="scope.row.reviewType == 1">形式评审表</span>
                <span v-if="scope.row.reviewType == 2">要素评审表</span>
                <span v-if="scope.row.reviewType == 3">附件要素评审表</span>
                <span v-if="scope.row.reviewType == 4">评审意见表</span>
              </template>
            </el-table-column>
            <el-table-column label="操作" align="center" width="150">
              <template slot-scope="scope">
                <el-button class="detail-btn" @click="goDetail(scope.row.reviewType,scope.row.id)">
                  <i class="el-icon-search">修改</i>
                </el-button>
              </template>
            </el-table-column>
          </el-table>
          <div class="aBtnBox">
            <input type="button" value="发送企业" @click="sendData" />
          </div>
        </div>
      </div>
    </div>
    <Footer />
    <el-dialog title :visible.sync="ideaPop2" width="80%">
      <div class="ideaMain">
        <h2 class="ideaTitle">突发事件综合应急预案评审意见表</h2>
        <p class="comName" v-if="detailData4.length>0">单位名称：{{detailData4[0].companyName}}</p>
        <table class="ideaTable" v-if="detailData4.length>0">
          <colgroup>
            <col width="160px" />
            <col width />
          </colgroup>
          <tr>
            <td>{{detailData4[0].reviewItemOne}}</td>
            <td>
              <strong>{{varname}}</strong>
            </td>
          </tr>
          <tr>
            <td>{{detailData4[1].reviewItemOne}}</td>
            <td></td>
          </tr>
          <tr>
            <td>{{detailData4[2].reviewItemOne}}</td>
            <td>
              <p>
                {{detailData4[0].createTime.split(' ')[0].split('-')[0]+'年'+detailData4[0].createTime.split(' ')[0].split('-')[1]+'月'+detailData4[0].createTime.split(' ')[0].split('-')[2]}}日，{{varname}}进行了应急预案专家评审工作。
                评审专家组参照《电力企业应急预案评审与备案细则》，从合法性、完整性、针对性、实用性、科学性、操作性和衔接性等方面，对应急预案的层次结构、语言文字、要素内容、附件项目等进行了系统的审查，并查看了应急预案桌面演练的记录，形成如下评审意见:
              </p>
              <el-input type="textarea" class='addSuggest' v-model="suggest2"></el-input>
            </td>
          </tr>
          <tr>
            <td>
              评审专家组
              <br />一致认为：
            </td>
            <td>
              <el-input type="textarea" v-model="consensus"></el-input>
            </td>
          </tr>
          <tr>
            <td>评审专家（签字）：</td>
            <td class="sign-word">
              <img
                v-for="item in signImg4"
                :key="item"
                :src="item"
                style="margin-right:10px;"
              />
            </td>
          </tr>
          <tr>
            <td>备注</td>
            <td>
              <el-input type="textarea" v-model="remark5"></el-input>
            </td>
          </tr>
        </table>
        <div class="clearfix">
          <a class="table_save" @click="savePersonAll">保存</a>
        </div>
      </div>
    </el-dialog>
    <el-dialog title :visible.sync="situationFlag" width="80%">
      <div class="ideaMain">
        <h2 class="ideaTitle">电力企业应急预案形式评审表</h2>
        <table class="ideaTable" v-if="detailData1.length>0">
          <thead>
            <tr>
              <th rowspan="2">评审项目</th>
              <th rowspan="2">评审内容及要求</th>
              <th colspan="3" style="font-weight:800;line-height:30px;">评审意见</th>
            </tr>
            <tr>
              <th style="line-height:30px;">符合</th>
              <th>不符合</th>
              <th>基本符合</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>{{detailData1[0].reviewItemTwo}}</td>
              <td>
                <p>{{detailData1[0].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData1[0].selectResult =item"
                :class="detailData1[0].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData1[1].reviewItemTwo}}</td>
              <td>
                <p>{{detailData1[1].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData1[1].selectResult =item"
                :class="detailData1[1].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData1[2].reviewItemTwo}}</td>
              <td>
                <p>{{detailData1[2].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData1[2].selectResult =item"
                :key="item"
                :class="detailData1[2].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td style="width:120px;">{{detailData1[3].reviewItemTwo}}</td>
              <td style="width:300px;">
                <p>{{detailData1[3].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData1[3].selectResult =item"
                :key="item"
                :class="detailData1[3].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData1[4].reviewItemTwo}}</td>
              <td>
                <p>{{detailData1[4].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData1[4].selectResult =item"
                :key="item"
                :class="detailData1[4].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData1[5].reviewItemTwo}}</td>
              <td>
                <p>{{detailData1[5].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData1[5].selectResult =item"
                :key="item"
                :class="detailData1[5].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>评审专家签字</td>
              <td colspan="4" class="sign-word">
                <img
                  v-for="item in signImg1"
                  :key="item"
                  :src="item"
                  style="margin-right:10px;"
                />
              </td>
            </tr>
          </tbody>
        </table>
        <div class="clearfix">
          <a class="table_save" @click="saveData(1)">保存</a>
        </div>
      </div>
    </el-dialog>
    <el-dialog title :visible.sync="keyFlag" width="80%">
      <div class="ideaMain">
        <h2 class="ideaTitle">电力企业综合应急预案要素评审表</h2>
        <table v-if="detailData2.length>0" class="ideaTable ideaTable1">
          <thead>
            <tr>
              <th rowspan="2" colspan="2">评审项目</th>
              <th rowspan="2">评审内容及要求</th>
              <th colspan="3">评审意见</th>
            </tr>
            <tr>
              <th>符合</th>
              <th>不符合</th>
              <th>基本符合</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td rowspan="5" style="width:80px;">{{detailData2[0].reviewItemOne}}</td>
              <td style="width:100px;">{{detailData2[0].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[0].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[0].selectResult =item"
                :class="detailData2[0].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[1].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[1].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[1].selectResult =item"
                :key="item"
                :class="detailData2[1].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[2].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[2].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[2].selectResult =item"
                :class="detailData2[2].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[3].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[3].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[3].selectResult =item"
                :key="item"
                :class="detailData2[3].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[4].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[4].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[4].selectResult =item"
                :key="item"
                :class="detailData2[4].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="2">{{detailData2[5].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[5].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[5].selectResult =item"
                :key="item"
                :class="detailData2[5].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td rowspan="2" style="padding:0 10px;">{{detailData2[6].reviewItemOne}}</td>
              <td>
                <p style="padding:0 10px;text-align:center;">{{detailData2[6].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[6].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[6].selectResult =item"
                :class="detailData2[6].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>
                <p
                  style="padding:0 10px;text-align:center;width:120px;"
                >{{detailData2[7].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[7].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[7].selectResult =item"
                :key="item"
                :class="detailData2[7].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td rowspan="2" style="padding:0 10px;">{{detailData2[8].reviewItemOne}}</td>
              <td>
                <p style="padding:0 10px;text-align:center;">{{detailData2[8].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[8].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[8].selectResult =item"
                :key="item"
                :class="detailData2[8].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>
                <p style="padding:0 10px;text-align:center;">{{detailData2[9].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[9].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[9].selectResult =item"
                :key="item"
                :class="detailData2[9].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td rowspan="4" style="padding:0 10px;">{{detailData2[10].reviewItemOne}}</td>
              <td>
                <p
                  style="padding:0 10px;text-align:center;width:120px;"
                >{{detailData2[10].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[10].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[10].selectResult =item"
                :class="detailData2[10].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>
                <p style="padding:0 20px;text-align:center;">{{detailData2[11].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[11].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[11].selectResult =item"
                :key="item"
                :class="detailData2[11].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>
                <p style="padding:0 20px;text-align:center;">{{detailData2[12].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[12].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[12].selectResult =item"
                :key="item"
                :class="detailData2[12].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>
                <p style="padding:0 20px;text-align:center;">{{detailData2[13].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[13].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[13].selectResult =item"
                :class="detailData2[13].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="2">{{detailData2[14].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[14].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[14].selectResult =item"
                :key="item"
                :class="detailData2[14].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="2">{{detailData2[15].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[15].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[15].selectResult =item"
                :key="item"
                :class="detailData2[15].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="2">{{detailData2[16].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[16].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[16].selectResult =item"
                :class="detailData2[16].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td rowspan="5" style="width:80px;padding:0 10px;">{{detailData2[17].reviewItemOne}}</td>
              <td style="width:100px;">{{detailData2[17].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[17].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[17].selectResult =item"
                :class="detailData2[17].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[18].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[18].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[18].selectResult =item"
                :class="detailData2[18].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[19].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[19].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[19].selectResult =item"
                :class="detailData2[19].selectResult== item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[20].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[20].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[20].selectResult =item"
                :key="item"
                :class="detailData2[20].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData2[21].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[21].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[21].selectResult =item"
                :key="item"
                :class="detailData2[21].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="6">
                <p>注：“＊”代表应急预案的关键要素。</p>
              </td>
            </tr>
            <tr>
              <td colspan="2">评审专家签字</td>
              <td colspan="4" class="sign-word">
                <img
                  v-for="item in signImg2"
                  :key="item"
                  :src="item"
                  style="margin-right:10px;"
                />
              </td>
            </tr>
          </tbody>
        </table>
        <h2 class="ideaTitle" style="margin-top:10px;">电力企业专项应急预案要素评审表</h2>
        <table class="ideaTable ideaTable1" v-if="detailData2.length>0">
          <thead>
            <tr>
              <th rowspan="2" colspan="2">评审项目</th>
              <th rowspan="2">评审内容及要求</th>
              <th colspan="3">评审意见</th>
            </tr>
            <tr>
              <th>符合</th>
              <th>不符合</th>
              <th>基本符合</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td colspan="2">{{detailData2[22].reviewItemTwo}}</td>
              <td>
                <p>{{detailData2[22].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[22].selectResult =item"
                :key="item"
                :class="detailData2[22].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td rowspan="2" style="width:80px;padding:0 10px;">{{detailData2[23].reviewItemOne}}</td>
              <td style="width:100px;padding:0 10px;">
                <p style="text-align:center;">{{detailData2[23].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[23].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[23].selectResult =item"
                :class="detailData2[23].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td style="width:100px;padding:0 10px;">
                <p style="text-align:center;">{{detailData2[24].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[24].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData2[24].selectResult =item"
                :key="item"
                :class="detailData2[24].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td style="width:100px;padding:0 10px;" colspan="2">
                <p style="text-align:center;">{{detailData2[25].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[25].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[25].selectResult =item"
                :class="detailData2[25].selectResult  == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td style="width:100px;padding:0 10px;" colspan="2">
                <p style="text-align:center;">{{detailData2[26].reviewItemTwo}}</p>
              </td>
              <td>
                <p>{{detailData2[26].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData2[26].selectResult =item"
                :class="detailData2[26].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="6">
                <p>注 : "*"代表应急预案的关键要素。如果专项应急预案作为综合应急预案的附件,综合应急预案已经明确胡要素,专项应急预案可省略。</p>
              </td>
            </tr>
            <tr>
              <td colspan="2">评审专家签字</td>
              <td colspan="4" class="sign-word">
                <img
                  v-for="item in signImg2"
                  :key="item"
                  :src="item"
                  style="margin-right:10px;"
                />
              </td>
            </tr>
          </tbody>
        </table>
        <div class="clearfix">
          <a class="table_save" @click="saveData(2)">保存</a>
        </div>
      </div>
    </el-dialog>
    <el-dialog title :visible.sync="addFlag" width="80%">
      <div class="ideaMain">
        <h2 class="ideaTitle">电力企业应急预案附件要素评审表</h2>
        <table v-if="detailData3.length > 0" class="ideaTable ideaTable1">
          <thead>
            <tr>
              <th rowspan="2">评审项目</th>
              <th rowspan="2">评审内容及要求</th>
              <th colspan="3">评审意见</th>
            </tr>
            <tr>
              <th>符合</th>
              <th>不符合</th>
              <th>基本符合</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>{{detailData3[0].reviewItemTwo}}</td>
              <td>
                <p>{{detailData3[0].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData3[0].selectResult =item"
                :class="detailData3[0].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData3[1].reviewItemTwo}}</td>
              <td>
                <p>{{detailData3[1].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData3[1].selectResult =item"
                :class="detailData3[1].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td>{{detailData3[2].reviewItemTwo}}</td>
              <td>
                <p>{{detailData3[2].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData3[2].selectResult =item"
                :key="item"
                :class="detailData3[2].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td style="width:120px;">{{detailData3[3].reviewItemTwo}}</td>
              <td style="width:300px;">
                <p>{{detailData3[3].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                @click="detailData3[3].selectResult =item"
                :key="item"
                :class="detailData3[3].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td style="width:120px;">{{detailData3[4].reviewItemTwo}}</td>
              <td style="width:300px;">
                <p>{{detailData3[4].reviewContent}}</p>
              </td>
              <td
                v-for="item in radios"
                :key="item"
                @click="detailData3[4].selectResult =item"
                :class="detailData3[4].selectResult == item ? 'div-radio1' : 'div-radio2'"
              ></td>
            </tr>
            <tr>
              <td colspan="5" style="text-align:left;">
                <p>注 : 附件根据应急工作需要动态设置,部分项目可省略。</p>
              </td>
            </tr>
            <tr>
              <td>评审专家签字</td>
              <td colspan="4" class="sign-word" >
                <img
                  v-for="item in signImg3"
                  :key="item"
                  :src="item"
                  style="margin-right:10px;"
                />
              </td>
            </tr>
          </tbody>
        </table>
        <div class="clearfix">
          <a class="table_save" @click="saveData(3)">保存</a>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import Header from "../common/header2";
import Footer from "../common/footer";
import config from "../../config.js";
export default {
  components: {
    Header,
    Footer
  },
  data() {
    return {
      planCompany: "",
      situationFlag: false,
      keyFlag: false,
      addFlag: false,
      ideaPop2: false,
      signImg1: "",
      signImg2: "",
      signImg3: "",
      signImg4: "",
      id1: "",
      remark5: "",
      consensus: "",
      varname: "",
      radios: [1, 2, 3],
      data1: [],
      detailData1: [],
      detailData2: [],
      detailData3: [],
      detailData4: [],
      suggest2: ""
    };
  },
  mounted() {
    var arr = [1, 2, 3, 4];
    this.varname = localStorage.planname.split(".")[0];
    arr.map(item => {
      this.getData(item);
    });
    this.planCompany = localStorage.planCompany;
  },
  methods: {
    sendData() {
      let url =
        config.baseUrl +
        "bsReviewSendCompany/v1.0/company/sendinfo?planSummaryId=" +
        localStorage.planid +
        "&userId=" +
        localStorage.userid;
      this.$axios.get(url).then(res => {
        if (res.data.meta.success) {
          this.$router.push("waitAssess");
        } else {
          this.$message.warning(res.data.meta.message);
        }
      });
    },
    saveData(n) {
      let list = [];
      this["detailData" + n].map((item, index) => {
        let obj = {
          id: item.id,
          selectResult: item.selectResult
        };
        list.push(obj);
      });
      this.$axios
        .post(config.baseUrl + "bsReview/v1.0/review/updatesummary", {
          mapList: list,
          planSummaryId: localStorage.planid,
          reviewType: n
        })
        .then(res => {
          if (res.data.meta.success) {
            this.$message.success(res.data.meta.message);
            if (n == 1) {
              this.situationFlag = false;
            } else if (n == 2) {
              this.keyFlag = false;
            } else {
              this.addFlag = false;
            }
          } else {
            this.$message.warning(res.data.meta.message);
          }
        })
        .catch(response => {
          console.log(response);
        });
    },
    savePersonAll(id) {
      if (this.suggest2 == "" || this.consensus == "") {
        this.$message.warning("专家建议不能为空");
      } else {
        let url = config.baseUrl + "emergency/v1.0/review/edit";
        let param = {
          consensus: this.consensus,
          opinion: this.suggest2,
          remarks: this.remark5,
          reviewType: "4",
          id: this.id1,
          summaryTemplateName: localStorage.planname,
          planSummaryId: localStorage.planid,
          userId: localStorage.userid
        };
        this.$axios.post(url, param).then(res => {
          if (res.data.meta.success) {
            this.$message.success(res.data.meta.message);
            this.ideaPop2 = false;
          } else {
            this.$message.warning(res.data.meta.message);
          }
        });
      }
    },
    getData(n) {
      let url =
        config.baseUrl +
        "bsReview/v1.0/review/querySummaryType?planSummaryId=" +
        localStorage.planid;
      this.$axios.get(url).then(res => {
        if (res.data.meta.success) {
          this.data1 = res.data.data;
        } else {
          this.$message.warning(res.data.meta.message);
        }
      });
    },
    goDetail(n, id) {
      this.id1 = id;
      switch (n) {
        case "1":
          this.situationFlag = true;
          break;
        case "2":
          this.keyFlag = true;
          break;
        case "3":
          this.addFlag = true;
          break;
        default:
          this.ideaPop2 = true;
          break;
      }
      if (n == 4) {
        this.getPersonDetail(id);
      } else {
        this.getDetail(n);
      }
    },
    getPersonDetail(id) {
      let url = config.baseUrl + "emergency/v1.0/review/look?id=" + id;
      this.$axios.post(url).then(res => {
        if (res.data.meta.success) {
          this.signImg4 = res.data.data.autograph;
          this.detailData4 = res.data.data.list;

          this.consensus = res.data.data.list[0].consensus;
          if (res.data.data.list[0].remarks) {
            this.remark5 = res.data.data.list[0].remarks;
          }

          this.signImg4 = res.data.data.url;
          this.suggest2 = res.data.data.list[0].opinion;
        } else {
          this.$message.warning(res.data.meta.message);
        }
      });
    },
    getDetail(n) {
      let url =
        config.baseUrl +
        "bsReview/v1.0/review/summaryInfoByType?planSummaryId=" +
        localStorage.planid +
        "&reviewType=" +
        n;
      this.$axios.get(url).then(res => {
        if (res.data.meta.success) {
          this["signImg" + n] = res.data.data.url;
          this["detailData" + n] = res.data.data.list;
        } else {
          this.$message.warning(res.data.meta.message);
        }
      });
    }
  }
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang='less'>
@import "../../../static/css/assess.less";
</style>
